import React, { Component } from "react";

const data = [
  { id: "001", content: "李文泰" },
  { id: "002", content: "李婉茹" },
  { id: "003", content: "周露" },
];
export default class Deatil extends Component {
  render() {
    const { id, title } = this.props.match.params;
    const findContent = data.find((item) => {
      return item.id === id;
    });

    return (
      <>
        <ul>
          <li>id:{id}</li>
          <li>title:{title}</li>
          <li>content:{findContent.content}</li>
        </ul>
      </>
    );
  }
}
